define(["../logic/share","../components/commonCtl"],function(pluginClass,c){
    return {
        pluginClass:pluginClass,
        style:{
            backgroundColor:"#F2F3F4"
        },
        root:["page_header","page_content"],
        components:{
            page_header:{
                type:"view",
                root:["header_title"],
                style:c.headerStyle
            },
            header_title:c.headerTitle("问题详情"),
            page_content:{
              type:"view",
              style:{
                flex:1,
                overflowY:"auto",
                overflowX:"hidden"
              },
              root:["QueWrapper","AnswerWrapper"]
            },

            AnswerWrapper:{
              type:"view",
              style:{
                borderTop:"1px solid #eee",
              },
              root:["answer_repeat"]
            },
            answer_repeat:{
              type:"repeat",
              ref:true,
              style:{
                flexDirection:"column",
              },
              root:["re_top_view","re_content_text","re_bottom_view"],
              itemStyle:{
                padding:"18 13 15 13",
                flexDirection:"column",
                backgroundColor:"#fff"
              },
              splitStyle:{
                borderTop:"1px solid #eee"
              },
              nodata:"answer_nodata"
            },
            re_bottom_view:{
              type:"view",
              style:{
                flexDirection:"row",
                justifyContent:"flex-end",
                marginTop:14
              },
              root:["re_answercount_icon","re_up_icon"]
            },
            re_answercount_icon:{
              type:"icon",
              ref:true,
              selectedClassName:"qaa_upicon_selected",
              font:"icomoon_e912",
              text:"0",
              text_bind:"commentNum",
              textStyle:c.rowIconTextStyle,
              iconStyle:c.rowIconIconStyle,
              style:c.rowIconStyle(false),
            },
            re_up_icon:{
              type:"icon",
              font:"icomoon_e90c",
              text:"0",
              activeClassName:"qaa_upicon_active",
              selectedClassName:"qaa_upicon_selected",
              text_bind:"likes",
              textStyle:c.rowIconTextStyle,
              iconStyle:c.rowIconIconStyle,
              style:c.rowIconStyle(true)
            },
            re_content_text:{
              type:"ContentLabelCtl",
              text_bind:"answerText",
              offsetCount:7,
              baseWidth:345,
              rowCount:5,
              expandStyle:{
                bottom:2,
              },
              collapseStyle:{
              },
              text:"回答内容",
              style:{
                fontSize:14,
                marginTop:18,
                lineHeight:"20",
                color:c.descColor
              },
            },
            re_top_view:{
              type:"view",
              style:{
                flexDirection:"row",
                alignItems:"center"
              },
              root:["re_header","re_nametime"]
            },
            re_header:{
              type:"image",
              src_bind:"headImgUrl",
              style:{
                w:40,
                borderRadius:'100%',
                backgroundColor:"#eee"
              }
            },
            re_nametime:{
              type:"view",
              style:{
                flex:1,
                marginLeft:10,
                justifyContent:"center"
              },
              root:["re_name","re_time"]
            },
            re_name:{
              type:"text",
              text:"用户",
              text_bind:"userName",
              style:{
                color:c.titleColor,
                fontSize:16
              }
            },
            re_time:{
              type:"text",
              text_bind:"createTime",
              text:"2012-02-12",
              style:{
                color:c.seTitleColor,
                fontSize:12,
                marginTop:4
              }
            },

            answer_nodata:{
              type:"text",
              className:"displaynone",
              style:{
                margin:"40% auto",
                textAlign:"center",
                width:"210",
                fontSize:15,
                color:c.seTitleColor
              },
              text:"暂时没有用户回答，有新的回答 会及时在我的提问中通知您"
            },
            QueWrapper:{
              type:"view",
              style:{
                backgroundColor:"#fff",
                padding:"15 0 15 15",
              },
              root:["QueTitle","Que_Desc","secondWrapper","QueLabelWrapper"]
            },
            QueTitle:{
              type:"icon",
              ref:true,
              text:"问题标题",
              font:"icomoon_e902",
              numberofline:2,
              style:{
                paddingRight:15,
                justifyContent:"flex-start",
                alignItems:"center"
              },
              textStyle:{
                fontSize:16,
                marginLeft:5,
                color:c.titleColor,
                width: "100%",
                paddingRight: "30"
              },
              iconStyle:{
                color:c.mainColor,
                fontSize:18
              }
            },
            Que_Desc:{
              type:"ContentLabelCtl",
              offsetCount:9,
              baseWidth:345,
              expandStyle:{
                bottom:9,
              },
              collapseStyle:{
              },
              ref:true,
              text:"",
              style:{
                marginRight:15,
                fontSize:15,
                lineHeight:21,
                paddingBottom:5,
                color:c.descColor,
                marginTop:11
              },
              preTextStyle:{
                color:c.seTitleColor
              },
              preText:"描述:"
            },
            secondWrapper:{
              type:"view",
              style:{
                flexDirection:"row",
                marginTop:10
              },
              root:["Que_username","Que_time","Que_answercount"]
            },
            Que_username:{
              type:"text",
              ref:true,
              text:"用户名称",
              style:{
                fontSize:12,
                color:c.seTitleColor
              }
            },
            Que_time:{
              type:"text",
              ref:true,
              text:"时间",
              style:{
                fontSize:12,
                marginLeft:8,
                color:c.seTitleColor
              }
            },
            Que_answercount:{
              type:"text",
              text:"0",
              ref:true,
              nextText:"个回答",
              style:{
                fontSize:12,
                color:c.descColor,
                marginLeft:20,
              },
              nextTextStyle:{
                fontSize:12,
                color:c.seTitleColor

              }
            },

            QueLabelWrapper:{
              type:"view",
              style:{
                flexDirection:"row",
                borderTop:"1px solid #eee",
                marginTop:14,
                paddingRight:15,
                paddingBottom:2,
                paddingTop:10,
              },
              root:["que_mark_repeat"]
            },
            que_mark_repeat:{
              type:"repeat",
              ref:true,
              style:{
                flex:1,
                flexWrap:"wrap"
              },
              items_bind:"label",
              itemStyle:{
                marginRight:5,
                marginTop:5,
              },
              root:["que_mark_text"]
            },
            que_mark_text:{
              type:"text",
              text_bind:"title",
              style:c.markLabelStyle
            },

        }
    };
});
